/**
 * 
 */
package net.phoenix.repository.nodetype;

import net.phoenix.repository.data.NodeDefinitionData;

/**
 * @author lixf
 *
 */
public class XMLNodeDefinition extends GeneralNodeDefinition{
	
	private NodeDefinitionData data;
	public XMLNodeDefinition(XMLNodeTypeDefinitionManager manager, XMLNodeType parent, NodeDefinitionData data) {
		super(manager,parent);
		this.data = data;
	}

	/* (non-Javadoc)
	 * @see javax.jcr.nodetype.ItemDefinition#getName()
	 */
	@Override
	public String getName() {	
		return this.data.getName();
	}

	/* (non-Javadoc)
	 * @see javax.jcr.nodetype.ItemDefinition#isAutoCreated()
	 */
	@Override
	public boolean isAutoCreated() {
		return this.data.isAutoCreated();
	}

	/* (non-Javadoc)
	 * @see javax.jcr.nodetype.ItemDefinition#isMandatory()
	 */
	@Override
	public boolean isMandatory() {
		return this.data.isMandatory();
	}
	/* (non-Javadoc)
	 * @see javax.jcr.nodetype.ItemDefinition#isProtected()
	 */
	@Override
	public boolean isProtected() {
		return this.data.isProtected();
	}

	/* (non-Javadoc)
	 * @see javax.jcr.nodetype.NodeDefinition#getDefaultPrimaryTypeName()
	 */
	@Override
	public String getDefaultPrimaryTypeName() {
		return this.data.getNodeType();
	}

	/* (non-Javadoc)
	 * @see javax.jcr.nodetype.NodeDefinition#allowsSameNameSiblings()
	 */
	@Override
	public boolean allowsSameNameSiblings() {
		return this.data.isAllowsSameNameSiblings();
	}
}
